package com.yunji.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yunji.common.base.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * @author : peter-zhu
 * @date : 2025/4/3 14:31
 * @description : TODO
 **/
@EqualsAndHashCode(callSuper = true)
@TableName("t_order_ordinal")
@Data
public class OrderOrdinalDO extends BaseDO {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "订单格子id")
    private Long orderOrdinalId;

    @ApiModelProperty("订单ID")
    private Long orderId;

    @ApiModelProperty(value = "订单流水号")
    private String orderCode;

    @ApiModelProperty(value = "订单明细id")
    private Long orderDetailId;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("sku")
    private String sku;

    @ApiModelProperty(value = "格子号")
    private Integer ordinal;

    @ApiModelProperty("商品数量")
    private Integer productNums;

    @ApiModelProperty("当前格子剩余数量")
    private Integer remainingNums;

    private String imei;

    public OrderOrdinalDO() {
    }

    public OrderOrdinalDO(Long productId, Integer ordinal, Integer productNums, Integer remainingNums) {
        this.productId = productId;
        this.remainingNums = remainingNums;
        this.productNums = productNums;
        this.ordinal = ordinal;
    }

    @Override
    public String toString() {
        return "OrderOrdinalDO{" +
                "orderCode='" + orderCode + '\'' +
                ", orderDetailId=" + orderDetailId +
                ", orderId=" + orderId +
                ", orderOrdinalId=" + orderOrdinalId +
                ", ordinal=" + ordinal +
                ", productId=" + productId +
                ", productNums=" + productNums +
                ", remainingNums=" + remainingNums +
                ", sku='" + sku + '\'' +
                '}';
    }
}
